package com.test.springboot3.springboot3testdemo1.dao;

import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/8/4-22:41
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@RequiredArgsConstructor
@Repository
public class UserDaoImpl implements UserDao {
  private final JdbcTemplate jdbcTemplate;

  @Transactional
  @Override
  public void update() {
    jdbcTemplate.execute("update  t_user set user name = 'Petty' where id=1");
    throw new RuntimeException("test");
  }
}
